/*Hdip Project 2013-14, Student Name:- Chris Pembroke,  Student Number:- x00115839*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using System.ComponentModel.DataAnnotations; // added namespace for validations

namespace Exercise1Project.Models
{
    public class EmailCustomer
    {
        [Required(ErrorMessage = "Required Field!")]
        [MaxLength(50)]
        [RegularExpression(@"[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}", ErrorMessage = "Please enter correct email")]
        public string From { get; set; }

        [Required(ErrorMessage = "Required Field!")]
        [MaxLength(50)]
        [RegularExpression(@"[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}", ErrorMessage = "Please enter correct email")]
        public string To { get; set; }

        [Required(ErrorMessage = "Required Field!")]
        [StringLength(100)]
        public string Subject { get; set; }

        [Required(ErrorMessage = "Required Field!")]
        [StringLength(300)]
        public string Body { get; set; }
    }
}